package com.example.project.dto;

import java.time.LocalDate;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 问题，存储项目中的任务、缺陷等问题对象 t_issues
 * 
 * @author ruoyi
 * @date 2025-09-19
 */
public class IssueDTO {

	/** 问题ID，主键 */
	private Long id;

	/** 跟踪类型ID */
	private Long trackerId;

	private String trackerName;

	/** 所属项目ID */
	private Long projectId;

	private String projectName;

	/** 问题主题 */
	private String subject;

	/** 问题描述 */
	private String description;

	/** 截止日期 */
	private LocalDate startDate;

	/** 截止日期 */
	private LocalDate dueDate;

	/** 预计时间 */
	private String estimatedHours;

	/** 分类ID */
	private Long categoryId;

	private String categoryName;

	/** 状态ID */
	private Long statusId;

	private String statusName;

	/** 指派给用户ID */
	private Long assignedToId;

	private String assignedToName;

	/** 优先级ID */
	private Long priorityId;

	private String priorityName;

	/** 修复版本ID */
	private Long fixedVersionId;

	/** 作者ID */
	private Long authorId;

	private String authorName;

	private String createUser;

	private String updateUser;

	/** 锁定版本（用于并发控制） */
	private Long lockVersion;

	/** 任务完成百分比 */
	private Integer doneRatio;

	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return id;
	}

	public void setTrackerId(Long trackerId) {
		this.trackerId = trackerId;
	}

	public Long getTrackerId() {
		return trackerId;
	}

	public void setProjectId(Long projectId) {
		this.projectId = projectId;
	}

	public Long getProjectId() {
		return projectId;
	}

	public void setSubject(String subject) {
		this.subject = subject;
	}

	public String getSubject() {
		return subject;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getDescription() {
		return description;
	}

	public void setDueDate(LocalDate dueDate) {
		this.dueDate = dueDate;
	}

	public LocalDate getDueDate() {
		return dueDate;
	}

	public LocalDate getStartDate() {
		return startDate;
	}

	public void setStartDate(LocalDate startDate) {
		this.startDate = startDate;
	}

	public String getEstimatedHours() {
		return estimatedHours;
	}

	public void setEstimatedHours(String estimatedHours) {
		this.estimatedHours = estimatedHours;
	}

	public void setCategoryId(Long categoryId) {
		this.categoryId = categoryId;
	}

	public Long getCategoryId() {
		return categoryId;
	}

	public void setStatusId(Long statusId) {
		this.statusId = statusId;
	}

	public Long getStatusId() {
		return statusId;
	}

	public void setAssignedToId(Long assignedToId) {
		this.assignedToId = assignedToId;
	}

	public Long getAssignedToId() {
		return assignedToId;
	}

	public void setPriorityId(Long priorityId) {
		this.priorityId = priorityId;
	}

	public Long getPriorityId() {
		return priorityId;
	}

	public void setFixedVersionId(Long fixedVersionId) {
		this.fixedVersionId = fixedVersionId;
	}

	public Long getFixedVersionId() {
		return fixedVersionId;
	}

	public void setAuthorId(Long authorId) {
		this.authorId = authorId;
	}

	public Long getAuthorId() {
		return authorId;
	}

	public void setLockVersion(Long lockVersion) {
		this.lockVersion = lockVersion;
	}

	public Long getLockVersion() {
		return lockVersion;
	}

	public Integer getDoneRatio() {
		return doneRatio;
	}

	public void setDoneRatio(Integer doneRatio) {
		this.doneRatio = doneRatio;
	}

	public String getTrackerName() {
		return trackerName;
	}

	public void setTrackerName(String trackerName) {
		this.trackerName = trackerName;
	}

	public String getProjectName() {
		return projectName;
	}

	public void setProjectName(String projectName) {
		this.projectName = projectName;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public String getStatusName() {
		return statusName;
	}

	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}

	public String getAssignedToName() {
		return assignedToName;
	}

	public void setAssignedToName(String assignedToName) {
		this.assignedToName = assignedToName;
	}

	public String getPriorityName() {
		return priorityName;
	}

	public void setPriorityName(String priorityName) {
		this.priorityName = priorityName;
	}

	public String getAuthorName() {
		return authorName;
	}

	public void setAuthorName(String authorName) {
		this.authorName = authorName;
	}

	public String getCreateUser() {
		return createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	public String getUpdateUser() {
		return updateUser;
	}

	public void setUpdateUser(String updateUser) {
		this.updateUser = updateUser;
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).append("id", getId())
				.append("trackerId", getTrackerId()).append("projectId", getProjectId()).append("subject", getSubject())
				.append("description", getDescription()).append("dueDate", getDueDate())
				.append("categoryId", getCategoryId()).append("statusId", getStatusId())
				.append("assignedToId", getAssignedToId()).append("priorityId", getPriorityId())
				.append("fixedVersionId", getFixedVersionId()).append("authorId", getAuthorId())
				.append("lockVersion", getLockVersion()).toString();
	}
}
